local sk__lvezhen = fk.CreateSkill {

  name = "sk__lvezhen",

  tags = {},

}



sk__lvezhen:addEffect(fk.TargetSpecified, {
  name = "sk__lvezhen",
  anim_type = "offensive",
  events = { fk.TargetSpecified },
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(sk__lvezhen.name) and
        (data.card.trueName == "slash" or data.card.type == Card.TypeTrick) and
        #data:getAllTargets() == 1 and data.to ~= player and player.phase == Player.Play and
        not data:getAllTargets()[1]:isNude() and
        player:usedSkillTimes(sk__lvezhen.name, Player.HistoryPhase) == 0
  end,
  on_cost = function(self, event, target, player, data)
    return player.room:askForSkillInvoke(player, sk__lvezhen.name, nil, "#sk__lvezhen-invoke::" .. data.to.id)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local to = data.to
    room:doIndicate(player.id, { data.to })
    room:moveCardTo(table.random(to:getCardIds("he")), Card.PlayerHand, player, fk.ReasonPrey, sk__lvezhen.name, nil,
      false, player)
  end,
})

return sk__lvezhen
